//
//  GaoDeResultViewController.m
//  HanlinWeather
//
//  Created by 任翰林 on 2017/4/13.
//  Copyright © 2017年 任翰林. All rights reserved.
//

#import "GaoDeResultViewController.h"
#import "GaoDeResultCell.h"
#import <AMapSearchKit/AMapSearchKit.h>
@interface GaoDeResultViewController ()

@end

@implementation GaoDeResultViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"搜索结果";
    self.tableView.tableFooterView = [UIView new];
    
    
    
    
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;
{
    return self.mapResponse.pois.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
{
    GaoDeResultCell * cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
    if (!cell) {
        cell = [[GaoDeResultCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
    }
    
    AMapPOI * poi = [self.mapResponse.pois objectAtIndex:indexPath.row];
    cell.nameLable.text = poi.name;
    cell.addressLable.text = poi.address;

    return cell;
}


- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 60;
}

@end
